#include "loader.hpp"
#include <fstream>

extern std::map<uint64_t, Semaphore<std::array<char, 4096>>> memory;
extern IOChannel ioctrl;

void loadFile(const char *filename)
{
	std::fstream rom = std::fstream(filename, std::ios::in | std::ios::binary);
	memory[0] = Semaphore<std::array<char, 4096>>();
	for (int i = 0; i < 4096; i++)
	{
		memory[0].get()[i] = rom.get();
	}
}